<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller {

    function __construct(){
        parent::__construct();
    }
    
    public function nama_check($nama) {
        if (preg_match("/^([a-zA-Z]+(?:\.)?(?:(?:\'|\s)[a-zA-Z]+(?:\.)?)*){3,}$/", str_replace("&#039;", "'", $nama))) {
            return TRUE;
        } else {
            $this->form_validation->set_message("nama_check", "Format %s tidak sesuai");
            return FALSE;
        }
    }
}

class PB_Controller extends MY_Controller {
    
    function __construct(){
        parent::__construct();    
    }
    
    public function view($view, $data = array()) {
        $data["page_menu"] = $this->router->fetch_method();
                
        $this->load->view('template/header_public', $data);
        $this->load->view($view, $data);
        $this->load->view('template/footer_public');
    }
}

class PV_Controller extends MY_Controller {
    
    function __construct(){
        parent::__construct();    
    }
    
    public function view($view, $data = array()) {
        $data["page_controller"] = $this->router->fetch_class();
        $data["page_menu"] = $this->router->fetch_method();
        
        $this->load->view('template/header_private', $data);
        $this->load->view($view, $data);
        $this->load->view('template/footer_private');
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */